Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Text on buttons should not be selectable Rev 2 #4431

Merged
merged 2 commits into from Jun 1, 2012
Merged

Text on buttons should not be selectable Rev 2 #4431

merged 2 commits into from Jun 1, 2012

Conversation

MauriceG
Copy link
Contributor

Removes the .ui-checkbox label user-select rule for checkboxes and radios
adds user-select: none for ui-btn-text at all

Demo: http://jsfiddle.net/MauriceG/SbFSk/show/
(demo uses own hosted css with this changes applied)

@jaspermdegroot
Copy link
Contributor

hi @MauriceG

The demonstrate the point I tried to make about listviews (see #4373) look at those two fiddles:

http://jsfiddle.net/B9QG3/5/show/ - This one loads current CSS. When I click in front of a movie I can select the text. Now I can right click and copy that title or in Chrome I can search Google for that movie (and I can read about it on IMDb.com in only two clicks :-) )
http://jsfiddle.net/B9QG3/4/show/ - This one loads your CSS. Now I am no longer able to do what I described above.

The type of content listviews are used for is different from the other buttons types, so IMHO we should make an exception for this.

@MauriceG
Copy link
Contributor Author

Hi @uGoMobi
I've to say, that I was trying to avoid that selectable text in a listview also...
The "two-click-convenient-google-search" you described, works just in some desktop browsers, only with inset lists, and only one word is selected when clicking. Okay, with Safari on Win I can right click the text in a list item and the whole text is selected, but this I've tried to avoid cause it looks a bit odd.

@jaspermdegroot
Copy link
Contributor

Hi @MauriceG !

I understand it was your intention to apply to this listview buttons as well :-)
Also, I totally agree it looks odd. My opinion was based on usability only.
I did some more testing with this and have to admit that in many situations it is difficult to select just one list item.
After all it turns out my usability argument isn't very strong. I changed my mind and agree with you now that we should disable user-select for all buttons.

@MauriceG
Copy link
Contributor Author

MauriceG commented Jun 1, 2012

Hi @uGoMobi !
I also have to admit that the usability you've described could by convenient sometimes, but it's may really on edge case, I think.
Thanks for testing and for your straight answer!
Maurice

@jaspermdegroot
Copy link
Contributor

@toddparker

Summary: This PR from @MauriceG does exactly what you requested (#4373 (comment)). It won't affect read-only lists items, now or after we changed those in 1.2.
I started a discussion about excluding listview buttons from the rule, but changed my mind.
Ok to merge?

@toddparker
Copy link
Contributor

I think this is ok to merge, yes.

jaspermdegroot added a commit that referenced this pull request Jun 1, 2012
Text on buttons should not be selectable Rev 2
@jaspermdegroot jaspermdegroot merged commit 8c7b8d4 into jquery-archive:master Jun 1, 2012
jaspermdegroot added a commit that referenced this pull request Jun 1, 2012
Text on buttons should not be selectable Rev 2
@MauriceG
Copy link
Contributor Author

MauriceG commented Jun 1, 2012

Hi @uGoMobi !
Thanks for having an eye on this!
Hartelijk dank!
Maurice

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants